<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TodoList 深色主题原型 - 高保真设计</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
            background: #0a0a0a;
            color: #ffffff;
            line-height: 1.6;
            overflow-x: auto;
        }

        /* 主容器 */
        .prototype-container {
            min-height: 100vh;
            background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
        }

        /* 顶部导航栏 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 80px;
            background: rgba(28, 28, 30, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid #48484a;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 1000;
            box-shadow: 0 2px 20px rgba(0, 122, 255, 0.1);
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .nav-logo {
            width: 40px;
            height: 40px;
            background: linear-gradient(45deg, #007aff, #5ac8fa);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: white;
            box-shadow: 0 0 20px rgba(0, 122, 255, 0.5);
        }

        .nav-title {
            font-size: 24px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: linear-gradient(45deg, #007aff, #5ac8fa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-subtitle {
            font-size: 12px;
            color: #8e8e93;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: -4px;
        }

        .nav-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .nav-btn {
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid #48484a;
            border-radius: 8px;
            color: #ffffff;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .nav-btn:hover {
            background: rgba(0, 122, 255, 0.2);
            border-color: #007aff;
            transform: translateY(-1px);
        }

        .nav-btn.active {
            background: linear-gradient(45deg, #007aff, #5ac8fa);
            border-color: #007aff;
            box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
        }

        /* 页面导航 */
        .page-nav {
            position: fixed;
            top: 80px;
            left: 0;
            right: 0;
            height: 60px;
            background: rgba(44, 44, 46, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid #48484a;
            display: flex;
            align-items: center;
            padding: 0 20px;
            z-index: 999;
            overflow-x: auto;
        }

        .page-tabs {
            display: flex;
            gap: 8px;
            min-width: max-content;
        }

        .page-tab {
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid #48484a;
            border-radius: 20px;
            color: #8e8e93;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .page-tab:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            transform: translateY(-1px);
        }

        .page-tab.active {
            background: linear-gradient(45deg, #007aff, #5ac8fa);
            border-color: #007aff;
            color: white;
            box-shadow: 0 0 15px rgba(0, 122, 255, 0.3);
        }

        /* 内容区域 */
        .content-area {
            margin-top: 140px;
            padding: 20px;
            display: flex;
            gap: 20px;
            overflow-x: auto;
            min-height: calc(100vh - 140px);
        }

        /* 页面容器 */
        .page-container {
            min-width: 375px;
            height: 812px;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 
                0 0 50px rgba(0, 122, 255, 0.2),
                0 20px 40px rgba(0, 0, 0, 0.5);
            position: relative;
            background: #1c1c1e;
            flex-shrink: 0;
        }

        .page-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, 
                rgba(0, 122, 255, 0.1) 0%, 
                rgba(90, 200, 250, 0.05) 100%);
            pointer-events: none;
            z-index: 1;
        }

        .page-frame {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 20px;
            position: relative;
            z-index: 2;
        }

        .page-label {
            position: absolute;
            top: -40px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 14px;
            font-weight: 600;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 1px;
            z-index: 3;
        }

        /* 单页面视图模式 */
        .single-view .content-area {
            justify-content: center;
        }

        .single-view .page-container:not(.active) {
            display: none;
        }

        .single-view .page-container.active {
            min-width: 375px;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .content-area {
                padding: 10px;
                gap: 10px;
            }
            
            .page-container {
                min-width: 320px;
                height: 600px;
            }
            
            .nav-title {
                font-size: 18px;
            }
            
            .nav-subtitle {
                display: none;
            }
        }

        /* 加载动画 */
        .loading {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            font-size: 16px;
            color: #8e8e93;
        }

        .loading::before {
            content: '';
            width: 20px;
            height: 20px;
            border: 2px solid #48484a;
            border-top: 2px solid #007aff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 12px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 滚动条样式 */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #1c1c1e;
        }

        ::-webkit-scrollbar-thumb {
            background: #48484a;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #636366;
        }

        /* 提示信息 */
        .info-panel {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(44, 44, 46, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid #48484a;
            border-radius: 12px;
            padding: 16px;
            max-width: 300px;
            color: #ffffff;
            font-size: 12px;
            z-index: 1001;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .info-panel h4 {
            margin: 0 0 8px 0;
            font-size: 14px;
            color: #007aff;
        }

        .info-panel ul {
            margin: 8px 0 0 16px;
            color: #8e8e93;
        }

        .info-panel li {
            margin-bottom: 4px;
        }
    </style>
</head>
<body>
    <div class="prototype-container">
        <!-- 顶部导航栏 -->
        <nav class="top-nav">
            <div class="nav-brand">
                <div class="nav-logo">⚡</div>
                <div>
                    <div class="nav-title">TodoList Pro</div>
                    <div class="nav-subtitle">深色主题原型设计</div>
                </div>
            </div>
            
            <div class="nav-controls">
                <button class="nav-btn active" id="allViewBtn" onclick="switchViewMode('all')">
                    <i class="fas fa-th"></i>
                    <span>全部页面</span>
                </button>
                <button class="nav-btn" id="singleViewBtn" onclick="switchViewMode('single')">
                    <i class="fas fa-mobile-alt"></i>
                    <span>单页模式</span>
                </button>
                <button class="nav-btn" onclick="toggleInfo()">
                    <i class="fas fa-info-circle"></i>
                    <span>说明</span>
                </button>
            </div>
        </nav>

        <!-- 页面导航 -->
        <nav class="page-nav">
            <div class="page-tabs">
                <button class="page-tab active" onclick="showPage('home')" data-page="home">
                    <i class="fas fa-home"></i>
                    <span>主页</span>
                </button>
                <button class="page-tab" onclick="showPage('detail')" data-page="detail">
                    <i class="fas fa-edit"></i>
                    <span>任务详情</span>
                </button>
                <button class="page-tab" onclick="showPage('profile')" data-page="profile">
                    <i class="fas fa-user"></i>
                    <span>我的页面</span>
                </button>
                <button class="page-tab" onclick="showPage('analytics')" data-page="analytics">
                    <i class="fas fa-chart-bar"></i>
                    <span>数据分析</span>
                </button>
                <button class="page-tab" onclick="showPage('completed')" data-page="completed">
                    <i class="fas fa-check-circle"></i>
                    <span>已完成</span>
                </button>
            </div>
        </nav>

        <!-- 内容区域 -->
        <div class="content-area" id="contentArea">
            <!-- 主页 -->
            <div class="page-container active" id="home-container">
                <div class="page-label">🏠 主页 - 任务列表</div>
                <iframe src="home.html" class="page-frame" id="home-frame"></iframe>
            </div>

            <!-- 任务详情页 -->
            <div class="page-container" id="detail-container">
                <div class="page-label">📝 任务详情 - 编辑界面</div>
                <iframe src="detail.html" class="page-frame" id="detail-frame"></iframe>
            </div>

            <!-- 我的页面 -->
            <div class="page-container" id="profile-container">
                <div class="page-label">👤 我的页面 - 控制中心</div>
                <iframe src="profile.html" class="page-frame" id="profile-frame"></iframe>
            </div>

            <!-- 数据分析页 -->
            <div class="page-container" id="analytics-container">
                <div class="page-label">📊 数据分析 - 统计报告</div>
                <iframe src="analytics.html" class="page-frame" id="analytics-frame"></iframe>
            </div>

            <!-- 已完成任务页 -->
            <div class="page-container" id="completed-container">
                <div class="page-label">✅ 已完成 - 历史记录</div>
                <iframe src="completed.html" class="page-frame" id="completed-frame"></iframe>
            </div>
        </div>

        <!-- 信息面板 -->
        <div class="info-panel" id="infoPanel" style="display: none;">
            <h4><i class="fas fa-info-circle"></i> 原型说明</h4>
            <p><strong>深色主题 TodoList 小程序原型</strong></p>
            <ul>
                <li>🎨 完整的深色主题设计系统</li>
                <li>⚡ 霓虹发光效果和动画</li>
                <li>📱 模拟真实小程序体验</li>
                <li>🔧 可直接用于开发参考</li>
                <li>🎯 高保真交互原型</li>
            </ul>
            <p style="margin-top: 12px; padding-top: 8px; border-top: 1px solid #48484a; font-size: 11px; color: #636366;">
                使用方向键或鼠标滚轮浏览所有页面
            </p>
        </div>
    </div>

    <script>
        let currentViewMode = 'all';
        let currentPage = 'home';

        // 切换视图模式
        function switchViewMode(mode) {
            const contentArea = document.getElementById('contentArea');
            const allViewBtn = document.getElementById('allViewBtn');
            const singleViewBtn = document.getElementById('singleViewBtn');
            
            currentViewMode = mode;
            
            if (mode === 'all') {
                // 全部页面模式
                contentArea.classList.remove('single-view');
                allViewBtn.classList.add('active');
                singleViewBtn.classList.remove('active');
                
                // 显示所有页面
                document.querySelectorAll('.page-container').forEach(container => {
                    container.style.display = 'block';
                });
                
                showToast('切换到全部页面模式', 'info');
            } else {
                // 单页模式
                contentArea.classList.add('single-view');
                singleViewBtn.classList.add('active');
                allViewBtn.classList.remove('active');
                
                // 只显示当前激活的页面
                showPage(currentPage);
                showToast('切换到单页模式', 'info');
            }
        }

        // 显示指定页面
        function showPage(pageId) {
            currentPage = pageId;
            
            // 更新页面标签状态
            document.querySelectorAll('.page-tab').forEach(tab => {
                tab.classList.remove('active');
            });
            document.querySelector(`[data-page="${pageId}"]`).classList.add('active');
            
            if (currentViewMode === 'single') {
                // 单页模式下只显示选中的页面
                document.querySelectorAll('.page-container').forEach(container => {
                    container.classList.remove('active');
                });
                document.getElementById(`${pageId}-container`).classList.add('active');
            } else {
                // 全部页面模式下滚动到指定页面
                const targetContainer = document.getElementById(`${pageId}-container`);
                targetContainer.scrollIntoView({ 
                    behavior: 'smooth', 
                    block: 'nearest',
                    inline: 'center' 
                });
            }
            
            // 高亮显示当前页面
            document.querySelectorAll('.page-container').forEach(container => {
                container.style.transform = 'scale(1)';
                container.style.opacity = '0.8';
            });
            
            const activeContainer = document.getElementById(`${pageId}-container`);
            activeContainer.style.transform = 'scale(1.02)';
            activeContainer.style.opacity = '1';
            
            setTimeout(() => {
                document.querySelectorAll('.page-container').forEach(container => {
                    container.style.transform = 'scale(1)';
                    container.style.opacity = '1';
                });
            }, 1000);
        }

        // 切换信息面板
        function toggleInfo() {
            const infoPanel = document.getElementById('infoPanel');
            if (infoPanel.style.display === 'none') {
                infoPanel.style.display = 'block';
                infoPanel.style.animation = 'slideIn 0.3s ease';
            } else {
                infoPanel.style.animation = 'slideOut 0.3s ease';
                setTimeout(() => {
                    infoPanel.style.display = 'none';
                }, 300);
            }
        }

        // 显示提示消息
        function showToast(message, type = 'info') {
            const colors = {
                success: '#30d158',
                danger: '#ff453a',
                info: '#007aff',
                warning: '#ff9500'
            };
            
            const toast = document.createElement('div');
            toast.style.cssText = `
                position: fixed;
                top: 160px;
                right: 20px;
                background: ${colors[type] || colors.info};
                color: white;
                padding: 12px 20px;
                border-radius: 8px;
                font-size: 14px;
                font-weight: 500;
                z-index: 10000;
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
                animation: slideIn 0.3s ease;
                max-width: 250px;
            `;
            toast.textContent = message;
            
            document.body.appendChild(toast);
            
            setTimeout(() => {
                toast.style.animation = 'slideOut 0.3s ease';
                setTimeout(() => {
                    toast.remove();
                }, 300);
            }, 2000);
        }

        // 键盘导航
        document.addEventListener('keydown', function(e) {
            const pages = ['home', 'detail', 'profile', 'analytics', 'completed'];
            const currentIndex = pages.indexOf(currentPage);
            
            switch(e.key) {
                case 'ArrowLeft':
                    if (currentIndex > 0) {
                        showPage(pages[currentIndex - 1]);
                    }
                    break;
                case 'ArrowRight':
                    if (currentIndex < pages.length - 1) {
                        showPage(pages[currentIndex + 1]);
                    }
                    break;
                case '1':
                case '2':
                case '3':
                case '4':
                case '5':
                    const pageIndex = parseInt(e.key) - 1;
                    if (pageIndex < pages.length) {
                        showPage(pages[pageIndex]);
                    }
                    break;
                case 'Escape':
                    if (currentViewMode === 'single') {
                        switchViewMode('all');
                    }
                    break;
            }
        });

        // 页面加载完成后的初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 添加iframe加载监听
            const frames = document.querySelectorAll('.page-frame');
            frames.forEach((frame, index) => {
                frame.addEventListener('load', function() {
                    console.log(`页面 ${frame.id} 加载完成`);
                });
                
                // 添加加载动画
                const container = frame.parentElement;
                const loading = document.createElement('div');
                loading.className = 'loading';
                loading.textContent = '加载中...';
                container.appendChild(loading);
                
                frame.addEventListener('load', function() {
                    loading.remove();
                });
            });

            // 显示欢迎提示
            setTimeout(() => {
                showToast('欢迎使用 TodoList 深色主题原型！', 'success');
            }, 500);

            // 自动隐藏信息面板
            setTimeout(() => {
                const infoPanel = document.getElementById('infoPanel');
                if (infoPanel.style.display !== 'none') {
                    infoPanel.style.display = 'block';
                    setTimeout(() => {
                        toggleInfo();
                    }, 3000);
                }
            }, 1000);
        });

        // 添加动画样式
        const style = document.createElement('style');
        style.textContent = `
            @keyframes slideIn {
                from {
                    opacity: 0;
                    transform: translateX(100%);
                }
                to {
                    opacity: 1;
                    transform: translateX(0);
                }
            }
            
            @keyframes slideOut {
                from {
                    opacity: 1;
                    transform: translateX(0);
                }
                to {
                    opacity: 0;
                    transform: translateX(100%);
                }
            }
            
            .page-container {
                transition: all 0.3s ease;
            }
            
            .page-frame {
                transition: opacity 0.3s ease;
            }
        `;
        document.head.appendChild(style);

        // 添加鼠标滚轮支持
        document.addEventListener('wheel', function(e) {
            if (currentViewMode === 'all') {
                const contentArea = document.getElementById('contentArea');
                contentArea.scrollLeft += e.deltaY;
                e.preventDefault();
            }
        });
    </script>
</body>
</html> 